﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Axis.Web
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           Response.Redirect("~/Views/Home/");
        }
        public string GetIP()
        {
            string clientMachineName;
            clientMachineName = (Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName);
            IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(clientMachineName);
            IPAddress[] addr = ipEntry.AddressList;
            string ret = "ClientMachineName: " + clientMachineName + "<br/>";
            int count = 0;
            foreach (IPAddress ad in addr)
            {
                ret += string.Format("[{0}]: {1}<br />", count, ad.ToString());
                count++;
            }
            return ret;
        }
    }
}